import { request } from '@/request'

export const getChildInfo = <T extends object, R = any>(
  data: T
): Promise<IResponse<R>> => {
  return request.GET<T>({ url: '/app/user/child-detail', params: data })
}

export const editRescue = <T extends object, R = any>(
  data: T
): Promise<IResponse<R>> => {
  return request.POST<T>({ url: '/app/user/update-child', params: data })
}

export const createChild = <T extends object, R = any>(
  data: T
): Promise<IResponse<R>> => {
  return request.POST<T>({ url: '/app/user/create-child', params: data })
}
